<template>
  <!--新增门店 杨灿-->
  <div>
    <el-row>
      <el-col span="10" offset="7">
      <el-form ref="form" :model="form" label-width="120px">
        <el-form-item label="门店编码">
          <el-input v-model="form.id"  :disabled="true"></el-input>
        </el-form-item>
        <el-form-item label="门店名称">
          <el-input v-model="form.name" :disabled="true"></el-input>
        </el-form-item>
        <el-form-item label="联系人">
          <el-input v-model="form.address" :disabled="true"></el-input>
        </el-form-item>
        <el-form-item label="联系电话">
          <el-input v-model="form.id" :disabled="true"></el-input>
        </el-form-item>
        <el-form-item label="地址">
          <el-input v-model="form.name" :disabled="true"></el-input>
        </el-form-item>
        <el-form-item label="门店坐标">
          <el-input v-model="form.address" :disabled="true"></el-input>
        </el-form-item>
        <el-form-item label="营业时间">
          <el-input v-model="form.name" :disabled="true"></el-input>
        </el-form-item>
        <el-form-item label="门店形象图">
          <el-upload
            action="https://jsonplaceholder.typicode.com/posts/"
            list-type="picture-card"
            :on-preview="handlePictureCardPreview"
            :on-remove="handleRemove">
            <i class="el-icon-plus"></i>
          </el-upload>
          <el-dialog :visible.sync="dialogVisible">
            <img width="100%" :src="dialogImageUrl" alt="">
          </el-dialog>
        </el-form-item>

        <el-form-item label="门店状态">
          <el-radio-group v-model="form.resource">
            <el-radio label="开启"></el-radio>
            <el-radio label="关闭"></el-radio>
          </el-radio-group>
        </el-form-item>
      </el-form>
      </el-col>
    </el-row>
  </div>
</template>

<script>
    export default {
      name: "LookStore",
      methods: {
        handleRemove(file, fileList) {
          console.log(file, fileList);
        },
        handlePictureCardPreview(file) {
          this.dialogImageUrl = file.url;
          this.dialogVisible = true;
        }
      },
      data() {
        return {
          dialogImageUrl: '',
          dialogVisible: false,
          form: {
            name: '',
            region: '',
            date1: '',
            date2: '',
            delivery: false,
            type: [],
            resource: '',
            desc: '',
            address: ''
          }
        }
      }
    }
</script>

<style scoped>

</style>
